package blog.pojo;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.fasterxml.jackson.annotation.JsonFormat;
import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.NoArgsConstructor;

import java.io.Serializable;
import java.util.Date;

/**
 * @author HuLin
 * @date
 */
@Data
@NoArgsConstructor
@AllArgsConstructor
public class Collects implements Serializable {
    @TableId(type = IdType.AUTO)
    private Integer id;
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss",timezone = "GMT+8")
    private Date createTime;
    private int uid;
    private int bid;

    public Collects(Integer id, Date createTime) {
	  this.id = id;
	  this.createTime = createTime;
    }

    @TableField(select = false, exist = false)
    private Blog blog;
    @TableField(select = false, exist = false)
    private User user;
}
